#include<bits/stdc++.h>
using namespace std;
int n;
map<int,int>a;
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    scanf("%d",&n);
    int mx=0;
    for(int i=1;i<=n;i++){
        int x;
        scanf("%d",&x);
        a[x]++,mx=max(mx,x);
    }
    int cnt=n;
    for(int i=2;i<=mx;i++){
        int t=a[i];
        if(!t) continue;
        for(int j=i-1;j>=1&&t;j--){
            if(t>a[j]){cnt-=a[j];t-=a[j];a[j]=0;}
            else{a[j]-=t;cnt-=t;break;}
        }
    }
    printf("%d\n",cnt);
    return 0;
}
